package org.javaboy.pub_sub_demo.consumer;

import org.javaboy.pub_sub_demo.model.Book;
import org.springframework.stereotype.Component;

@Component
public class MyConsumer02 {

    /**
     * 收到消息的时候，这个方法会被触发
     * @param message 消息本身
     * @param channel 消息所在的频道
     */
    public void receiveMessage(Book message, String channel) {
        System.out.println("MyConsumer02 接收到消息：" + message);
    }
}
